﻿@model MvcCmsProjectTracker.ViewModels.BugCommentViewModel
<div id="comments">
    @if (Model.BugComments.Count > 0)
    {
        foreach (var item in Model.BugComments)
        { <div>
               <b>
                   @string.Format("{0} - {1} ", item.UserName, item.DateCreated) </b>
               @Ajax.ActionLink("Delete", "DeleteComment", new { id = item.CommentID }, new AjaxOptions { HttpMethod="POST", UpdateTargetId = "comments", OnFailure = "handleFailure", Confirm = "Are you sure you want to delete this comment?", OnSuccess = "styleControls" })</div>
        <div>
            @item.Comment
        </div>
        <hr />
        }
    }
    @Html.Partial("ControlsProjectTracker/Message", Model)
</div>
